<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Title</title>
</head>
<body>

</body>
<script>
	// 1
	// var A = function () {}
	// A.prototype.n = 1
	// var b = new A()
	// var c = new A()
	// console.log(b.n, b.m, c.n, c.m);// 1 undefined 1 undefined
	
	// 2
	// var A = function() {}
	// A.prototype.n = 1
	// var b = new A();// b.__proto__ = {n:1}
	// A.prototype = {
	// 	n: 2,
	// 	m: 3
	// }
	// var c = new A()// c.__proto__ = {n:2,m:3}
	// console.log(b.n, b.m, c.n, c.m);// 1 undefined  2 3
	
	// 3
	var A = function() {
	}
	A.prototype.n = 1
	var b = new A();// b.__proto__ =  {n:100,m:200}
	A.prototype.n = 100;
	A.prototype.m = 200;
	var c = new A();// c.__proto__ =  {n:100,m:200}
	console.log(b.n, b.m, c.n, c.m);// 100 200 100 200
</script>
</html>